﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="DictionariesManage.aspx.cs" Inherits="Manage_DictionariesManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/Manage/Js/DictionariesManage.js"></script>
<script type="text/javascript">
    ModelOfDictionary =<%=new Dictionaries().ToJsonString() %>;
    SelectOptionOfDictionary = '<%=SelectOptionOfDictionary %>';
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td align="center"><img src="/Manage/Images/sousuo.gif" />词典类别：
      <select name="ddlCategoryOfSearch" id="ddlCategoryOfSearch">
        <option value="">--不限--</option>
        <%=SelectOptionOfDictionary %>
      </select>      
      &nbsp;状态：
      <select name="ddlStatusOfSearch" id="ddlStatusOfSearch">
        <option value="">--不限--</option>
       <option value="正用" <%=status == Status.正用.ToString()?"Selected":"" %>>正用</option>
       <option value="停用" <%=status == Status.停用.ToString()?"Selected":"" %>>停用</option>
      </select>
      &nbsp;
      <input name="btnSearch" type="button" id="btnSearch" value="执行搜索" class="btn2"  onclick="GoToSearch();"/> &nbsp;&nbsp; [ <a href="DictionariesManage.aspx" class="red bold">查看全部</a> ]</td>
  </tr>
</table>
<br />
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
  <tr>
    <td colspan="6" align="left" class="HeadTitle">&gt;&gt;词典表管理</td>
  </tr>
  <tr class="TableHeadRow">
    <td width="60" align="center">序号</td>
    <td align="left">词典名称</td>
    <td width="120" align="center">词典类别</td>
    <td width="60" align="center">状态</td>
    <td width="120" align="center">创建日期</td>
    <td width="150" align="center">管理 [<a onclick="Add();" href="javascript:void(0);" class="red">+添加词典</a>]</td>
  </tr>

  <%
      if (listOfDict != null)
      {
          for (int i = 0; i < listOfDict.Count; ++i)
          {
              Dictionaries d = listOfDict[i];
   %>
  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';">
    <td align="center"><%=(p.CurPage-1)*p.PageSize+i+1 %>.</td>
    <td align="left"><a href="javascript:void(0);" onclick="Edit(<%=d.DictionaryID%>);" ><%=d.DictionaryName%>(ID=<%=d.DictionaryID%>)</a> </td>
    <td align="center"><a href="<%=Utility.GetNewUrl("Category",HttpUtility.UrlEncode(d.Category),false) %>" title="查看该类别下所有词典"><%=d.Category%></a></td>
    <td align="center"><%=d.Status %></td>
    <td align="center"><%=d.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">[ <a href="javascript:void(0);" onclick="Edit(<%=d.DictionaryID%>);" >编辑</a> ] [ <a href="javascript:void(0);" onclick="Delete(<%=d.DictionaryID%>);" class="red">删除</a> ] </td>
  </tr>
   <%  }
       %>
         <tr>
    <td colspan="6" align="center" ><span class="page" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), p.CurPage, p.PageSize,10, p.TotalCount)%>    
        </span></td>
    </tr> 

       <%
      }
      else
      { %>
  <tr>
    <td colspan="6" align="center">[ <span class="red bold">系统未找到任何词典信息!</span> ]</td>
    </tr>
    <% } %>
</table>

</asp:Content>

